import BaseXform from '../base-xform';

class MergeCellXform extends BaseXform {
    get tag() {
        return 'mergeCell';
    }

    render(xmlStream, model) {
        xmlStream.leafNode('mergeCell', { ref: model });
    }

    parseXmlObject(node) {
        if (node._name === 'mergeCell') {
            this.model = node._attributes.ref;
            return true;
        }
        return false;
    }

    parseOpen(node) {
        if (node.name === 'mergeCell') {
            this.model = node.attributes.ref;
            return true;
        }
        return false;
    }

    parseText() {
    }

    parseClose() {
        return false;
    }
}

export default MergeCellXform;
